extends ../layout

block init
  -title = "商家信息"
  -dir = "/html/store/detail"


block body
  #app
    .header
      img#blur(:src="image", @load="loadedLogo")
      canvas#canvas
    .header2
      .logo(:style="{backgroundImage:'url('+ image + ')' }")
      .title(v-cloak) {{name}}
      .price(v-cloak) 起送价：{{min_price}}元
      hr
      div(v-cloak) {{address}}
    div.video(v-if="fuwu_code == 'food'",v-cloak)
      button.video_btn(@click="video_btn_click($event)") 隐藏现场视频
      video(v-if="!!video",width="100%",autoplay="autoplay",muted="true")
        source(:src="video",type="application/x-mpegURL")
        |对不起,您的浏览器不支持HTML5视频播放
    div.main
      .nav(v-if="categoryCount>1")
        template(v-for="(price,categoryName,cateindex) in category")
          a(:href="'#cate_' + cateindex",:class="{current: !cateindex }",v-cloak) {{categoryName}}
      .con(:class="{ con_fill :  categoryCount < 2 }")
        template(v-for="(price,categoryName,cateindex) in category")
          p(style={margin: "1rem"} ,:id="'cate_' + cateindex",v-cloak) {{categoryName}}
          .item(:index="item.ori_index" ,v-for="(item,index) in price")
            img(:src="getImg(item.image)")
            div
              .name(v-cloak) {{item.name}}
              .remark(v-cloak) {{item.remark}}
              .price(v-cloak) ￥{{(item.price/100).toFixed(2)}}元
              .num(v-cloak)
                input(v-model="item.number")
    footer
      img(src="../img/calc.png")
      div ￥
        span(v-cloak) {{(total/100).toFixed(2)}}元
        div(v-cloak) 配送费：{{(freightFee/1).toFixed(2)}}元
      #toConfirm 去结算
